﻿using LogManager.Gui.Helpers;
using LogManager.Gui.ViewModels;
using System.Windows;
using System.Windows.Controls;

namespace LogManager.Gui.Views
{
    /// <summary>
    /// Interaction logic for SettingsView.xaml
    /// </summary>
    public partial class SettingsView : UserControl, ISettingsView
    {
        public ISettingsViewModel ViewModel
        {
            get { return this.GetViewModelFromDataContext<ISettingsViewModel>(); }
            set { this.DataContext = value; }
        }

        public SettingsView()
        {
            InitializeComponent();
        }

        private void DataGrid_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
        {
           this.ViewModel.OnEmailEditEnding(sender, e);
        }
    }
}
